<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>My JSP 'select.jsp' starting page</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

</head>

<body>
	<form action="select" method="post">
		<div align="center">
			<table>
				<tr>
					<td>
						<div align="center">
							<select>
								<option>书名</option>
								<option>作者</option>
								<option>出版社</option>
							</select> <input type="text" name="bookName" /> <input type="submit"
								value="提交" />
						</div>
						<div>
							<a href="tiaozhuan">新增图书</a>
						</div></td>
				</tr>
				<tr>
					<td>书名</td>
					<td>作者</td>
					<td>出版社</td>
					<td>页数</td>
					<td>价格</td>
				</tr>
				<c:forEach var="list" items="${list}">
					<tr <c:if test="${status.count%2==1 }">bgcolor="#00FFFF"</c:if>>
						<td>${list.bookName}</td>
						<td>${list.bookAuthor}</td>
						<td>${list.bookPublish}</td>
						<td>${list.bookPage}</td>
						<td>${list.bookPrice}</td>
					</tr>
				</c:forEach>
			</table>
			<div class="row" align="center">
				<div class="col-sm-5">
					<div class="dataTables_info" id="datatable-responsive_info"
						role="status" aria-live="polite">${currentPageNo
						}/${totalPageCount }页/共${totalCount}条记录</div>
				</div>
				<div id="fenye">
					<div class="dataTables_paginate paging_simple_numbers"
						id="datatable-responsive_paginate">
						<ul class="pagination">
							<c:if test="${currentPageNo > 1}">
								<a href="select?pageIndex=1">首页</a>
								<a href="select?pageIndex=${currentPageNo - 1}">上一页</a>
							</c:if>
							<c:if test="${currentPageNo < totalPageCount }">
								<a href="select?pageIndex=${currentPageNo + 1}">下一页</a>
								<a href="select?pageIndex=${totalPageCount}">末页</a>
							</c:if>
						</ul>
					</div>
				</div>
			</div>
		</div>
	</form>
</body>
</html>
